#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
long long  f[50];
long long fun(int n) {
	if (n <= 2)return 1;
	//else if (n == 2)return 1;
	else return fun(n - 1) + fun(n - 2);

}
void init() {
	f[1] = 1;
	f[2] = 1;
	for (int i = 3; i <= 40; i++) {
		f[i] = f[i - 1] + f[i - 2];
	}
	return;
}

int main() {
	int n;
	init();
	while (scanf("%d", &n) != EOF) {
		printf("%lld\n", f[n]);
		printf("%lld\n", fun(n));
	}
	return 0;
}